﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="GB2312">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" id="viewport">
		<title>资金明细-迅泊达</title>
		<link rel="shortcut icon" href="favicon.ico"/>
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" href="css/financial-details.css" />
		<link rel="stylesheet" href="font/fanhui/iconfont.css" />
		<script src="js/jquery-1.11.2.min.js"></script>
		<script src="js/51size.js"></script>
		<script src="js/base.js"></script>
	</head>
	<body>
		<!--头部开始-->
		<header class="clearfix">
			<div class="header clearfix">
				<ul>
					<li>
						<a href="my-account.html">
							<i class="iconfont left-icon">&#xe64c;</i>
							<em>返回</em>
						</a>
					</li>
					<li>资金明细</li>
					<li></li>
				</ul>
			</div>
		</header>
		<!--头部结束-->
		<!--主体部分   开始-->
		<div>
			<table>
				<thead class="first">
					<tr>
						<th>类型</th>
						<th>资金操作</th>
						<th>记录时间</th>
						<th>备注信息</th>
					</tr>					
				</thead>
				<tbody id="main">
					
				</tbody>
			</table>
		</div>
		<!--主体部分   结束-->
		<!--尾部   开始-->
		<footer>
			<div class="list clearfix">
				<ul>
					<li>共888条</li>
					<li><a href="#">首页</a></li>
					<li><a href="#">上一页</a></li>
					<li><a href="#">下一页</a></li>
					<li><a href="#">尾页</a></li>
				</ul>
			</div>
			<!-- <div class="all"><a href="#">全部记录</a></div>
			<div class="search"><a href="#">搜索</a></div> -->
		</footer>
		<!--尾部   结束-->
		<script type="text/javascript">
			var personal=JSON.parse(localStorage.getItem('personal'));
			var uid=personal.uid;

			$(function() {
				$.ajax({
					type: 'post',
					dataType: 'JSON',
					async: false,
					url: baseUrl + "/app/fund/record",
					data:{uid:uid},
					success: function(result) {
						if(result.code==-1){
							//总条数
							var total=result.entity.total;
							//总页数
							var pages=result.entity.pages;

							var html="";
							for(var i=0;i<result.entity.pageList.length;i++){
								var entity=result.entity.pageList[i];
								var amount=0;
								if(entity.income==0){
									amount=entity.expend;
								}else{
									amount=entity.income;
								}
								html+="<tr>"+
										"<td>"+entity.type+"</td>"+
										"<td>"+
											"<em>￥</em>"+
											"<span>"+amount+"</span>"+
										"</td>"+
										"<td>"+formatFullDate(new Date(entity.createTime))+"</td>"+
										"<td>提现成功</td>"+
									   "</tr>";
							}	
							$("#main").html(html);
						}
						
					}
				});		

			})

		</script>	
	</body>
</html>
